/**
 * Author: ligj@mapbar.com
 * Create Time: 2018/01/05 15:07
 * Description:
 */

import Vue from 'vue'
import Vuex from 'vuex'

import modal from './modules/modal'
import tabView from './modules/tabView'

import travelPath from './modules/TravelPath'
import vehicleCondition from './modules/vehicleCondition'
Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default function ({state, mutations, actions, modules}) {
    return new Vuex.Store({
        state,
        mutations,
        actions,
        modules: {
            ...modules,
            modal,
            tabView,
            travelPath,
            vehicleCondition
        },
        strict: debug,
        plugins: []
    })
}
